package org.ayachinene.leetcode.problems;

public class P2351 {

    static class Solution {
        public char repeatedCharacter(String s) {
            boolean[] occur = new boolean[256];
            for (char c : s.toCharArray()) {
                if (occur[c]) {
                    return c;
                }
                occur[c] = true;
            }
            return 0;
        }
    }
}
